﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using YetAnotherChat.Common;

namespace YetAnotherChat.ChatCore.Models
{
    public class ChatMessage: EntityBase
    {
        public ChatMessage()
        {
            Date = System.Data.SqlTypes.SqlDateTime.MinValue.Value;
        }
        public string Text{get;set;}
        public DateTime Date {get;set;}
        public Guid ChatTopicGuidId {get;set;}
        public Guid UserGuidId {get;set;}

        public override string ToString()
        {
            return string.Format("Text:{0}.Date{1}.TopicGuid{2}.UserGuid{3}", Text, Date.ToShortDateString() + ";" + Date.ToShortTimeString(), ChatTopicGuidId, UserGuidId);
        }
    }
}
